using Imaginarium.jobs;
using System;
using System.Collections.Generic;
namespace Imaginarium.team {
    public class DetailJob:ICloneable
    {
        public int id { get; set; }
        public int jobExp { get; set; }
        public int jobLevel { get; set; }
        public int skillPtsRemaining { get; set; }
        public Job job { get; set; }
        public List<SkillDetail> skillDetail { get; set; }

        public DetailJob() {
            this.skillDetail = new List<SkillDetail>();
        }
        public DetailJob(Job job):
            this()
        {
            this.job = job;
        }
        public DetailJob(DetailJob detJobToClone):
            this()
        {
            
        }
        public int getJobId() {
            return job.idJob;
        }

        #region ICloneable Members

        public object Clone()
        {
            Type type = this.GetType();
            DetailJob newDetailJob = (DetailJob)Activator.CreateInstance(type);
            newDetailJob.id = this.id;
            newDetailJob.jobExp = this.jobExp;
            newDetailJob.jobLevel = this.jobLevel;
            newDetailJob.skillPtsRemaining = this.skillPtsRemaining;
            newDetailJob.job = this.job;
            if (this.skillDetail != null && this.skillDetail.Count > 0)
            {
                foreach (SkillDetail sd in this.skillDetail)
                {
                    newDetailJob.skillDetail.Add((SkillDetail)sd.Clone());
                }
            }
            return newDetailJob;
        }

        #endregion
    }
}